home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12173 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  990 b 

  1. Path: dsi.unimi.it!moreld
  2. From: moreld@dsi.unimi.it (~ZIO BUDDA~)
  3. Newsgroups: comp.lang.c++
  4. Subject: String.h
  5. Date: 18 Mar 1996 14:57:05 GMT
  6. Organization: Computer Science Dep. - Milan University
  7. Message-ID: <4ijtk1$m68@tic.sm.dsi.unimi.it>
  8. NNTP-Posting-Host: tac.fddi.dsi.unimi.it
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. hi, my question is this: I use g++ 2.7.0 and I have read that the 
  12. class String has the function del(char *) that delete a substring of
  13. base string. ok ??
  14.  
  15. bue if i make a program like
  16. main (int argc, char **argv)
  17. { String p;
  18.  
  19.   p ="Piipo/ppp";
  20.   p.del("ppp");
  21.   p += "aaa";
  22.   cout << p;
  23. }
  24.  
  25. why the computer return me p = "Piipo/pppaaa" and not \p = "Piipo/aaa"?
  26.  
  27. tnx in advance
  28.  
  29. --
  30. Zio Budda "sempre alla ricerca di un account..." moreld@ghost.dsi.unimi.it
  31. http://www.dsi.unimi.it/Users/Students/moreld/home.html
  32. Ask me for questions about LINUX and Games for PC, and see my home page 
  33. I'm a programmer and a consultant...
  34.  
  35. Tel. 02/2139959 ... Chiedere di Davide Michel
  36.